<?
	$nav = array("Home" => "", "Gallery" => "gallery/", "edit" => "#");

	$tpl->assign("dsfm_nav", $nav);

    $form = new Form( array(
		"gid" => array(
			"type" => "hidden"
		),

		"plaything" => array(
			"type" => "text",
			"width" => 400,
		),

		"image" => array(
			"type" => "upload",
			"show" => true,
			"desc" => "74px * 74px"
		),

		"detail" => array(
			"type" => "textarea",
			"lang" => "th/en",
			"width" => 400,
		),
		"warning" => array(
			"type" => "textarea",
			"lang" => "th/en",
			"width" => 400,
		)
	));

	$sql = "SELECT * FROM gallery WHERE gid = $gid";
	$rss = $db->query($sql);

	$data = new Data($rss);
	$form->add_data($data->fetch_unique());

	$form->add_action("update.php");

    $form->rain_display($tpl, "form");
?>